home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_10.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  2.4 KB  |  78 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4.  
  5.   <TITLE>Exposing Style Sheets in Communicator 4.0</TITLE>
  6.  
  7.  
  8.  
  9.   <STYLE>
  10.  
  11.     BODY             { background-color: white; font-size: 10pt; }
  12.  
  13.     FONT             { font-family: arial, helvetica, sans-serif; }
  14.  
  15.     FONT.pageTitle   { font-size: 18pt; }
  16.  
  17.     .layer           { background-color: yellow; }
  18.  
  19.     #arrow           { padding-right: 10px; }
  20.  
  21.     #banner          { position: absolute; left: 72; top: 8; }
  22.  
  23.   </STYLE>
  24.  
  25. </HEAD>
  26.  
  27.  
  28.  
  29. <BODY>
  30.  
  31.   <BLOCKQUOTE>
  32.  
  33.  
  34.  
  35.   <IMG ID=arrow SRC="arrow.gif">
  36.  
  37.  
  38.  
  39.   <DIV ID=banner CLASS=layer STYLE="color: blue;">
  40.  
  41.     <FONT CLASS=pageTitle>
  42.  
  43.       Exposing Style Sheets in Communicator 4.0
  44.  
  45.     </FONT>
  46.  
  47.   </DIV>
  48.  
  49.  
  50.  
  51.   <P>Each page element with the <TT>ID</TT> attribute reflects a
  52.  
  53.   style object into the <TT>ids</TT> array that represents the
  54.  
  55.   styles applied to that page element.  The following style has
  56.  
  57.   been applied to the <TT>arrow</TT> element:</P>
  58.  
  59.  
  60.  
  61.   <BLOCKQUOTE>
  62.  
  63.   <SCRIPT>
  64.  
  65.     document.writeln("<B>align:</B> ");
  66.  
  67.     document.writeln(document.ids.arrow.paddingRight);
  68.  
  69.     document.writeln("<BR>");
  70.  
  71.   </SCRIPT>
  72.  
  73.   </BLOCKQUOTE>
  74.  
  75.  
  76.  
  77.   <P>Each tag reflects a style object into the <TT>tags</TT> array
  78.  
  79.   that represents the styles applied to that tag.  The following
  80.  
  81.   style has been applied to the <TT>FONT</TT> tag:</P>
  82.  
  83.  
  84.  
  85.   <BLOCKQUOTE>
  86.  
  87.   <SCRIPT>
  88.  
  89.     document.writeln("<B>font-family:</B> ");
  90.  
  91.     document.writeln(document.tags.FONT.fontFamily);
  92.  
  93.     document.writeln("<BR>");
  94.  
  95.   </SCRIPT>
  96.  
  97.   </BLOCKQUOTE>
  98.  
  99.  
  100.  
  101.   <P>Each class reflects an array of style objects into the
  102.  
  103.   <TT>classes</TT> array that represents the styles applied to
  104.  
  105.   all tags of that class as well as the class in general.  The
  106.  
  107.   following style has been applied to the <TT>layer</TT> class:</P>
  108.  
  109.  
  110.  
  111.   <BLOCKQUOTE>
  112.  
  113.   <SCRIPT>
  114.  
  115.     document.writeln("<B>backgroundColor:</B> ");
  116.  
  117.     document.writeln(document.classes.layer.all.backgroundColor);
  118.  
  119.     document.writeln("<BR>");
  120.  
  121.   </SCRIPT>
  122.  
  123.   </BLOCKQUOTE>
  124.  
  125.  
  126.  
  127.   <P>Similarly, the following style has been applied only to elements
  128.  
  129.   whose class is <TT>pageTitle</TT> and whose tag is <TT>FONT</TT>:</P>
  130.  
  131.  
  132.  
  133.   <BLOCKQUOTE>
  134.  
  135.   <SCRIPT>
  136.  
  137.     document.writeln("<B>fontSize:</B> ");
  138.  
  139.     document.writeln(document.classes.pageTitle.FONT.fontSize);
  140.  
  141.     document.writeln("<BR>");
  142.  
  143.   </SCRIPT>
  144.  
  145.   </BLOCKQUOTE>
  146.  
  147.  
  148.  
  149.   </BLOCKQUOTE>
  150.  
  151. </BODY>
  152.  
  153. </HTML>
  154.  
  155.